package com.yanqu.road.entity.tradewar;

import com.yanqu.road.entity.DataObject;

import java.math.BigInteger;
import java.util.Objects;

public class UserTradeWarBuilding extends DataObject {

	private long userId;

	private int type;

	private int level;

	private long lastGetTime;

	private BigInteger lastValue = BigInteger.ZERO;

	private long lastValueChangeTime;

	private long totalGetRewardTimes;

	private BigInteger lastOutputSpeed = BigInteger.ZERO;

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setUpdateOption();
		}
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		if(this.type != type) {
			this.type = type;
			setUpdateOption();
		}
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		if(this.level != level) {
			this.level = level;
			setUpdateOption();
		}
	}

	public long getLastGetTime() {
		return lastGetTime;
	}

	public void setLastGetTime(long lastGetTime) {
		if(this.lastGetTime != lastGetTime) {
			this.lastGetTime = lastGetTime;
			setUpdateOption();
		}
	}

	public BigInteger getLastValue() {
		return lastValue;
	}

	public void setLastValue(BigInteger lastValue) {
		if(!Objects.equals(this.lastValue, lastValue)) {
			this.lastValue = lastValue;
			setUpdateOption();
		}
	}

	public long getLastValueChangeTime() {
		return lastValueChangeTime;
	}

	public void setLastValueChangeTime(long lastValueChangeTime) {
		if(this.lastValueChangeTime != lastValueChangeTime) {
			this.lastValueChangeTime = lastValueChangeTime;
			setUpdateOption();
		}
	}

	public BigInteger getLastOutputSpeed() {
        return lastOutputSpeed;
    }

    public void setLastOutputSpeed(BigInteger lastOutputSpeed) {
	    if(!Objects.equals(this.lastOutputSpeed, lastOutputSpeed)) {
            this.lastOutputSpeed = lastOutputSpeed;
            setUpdateOption();
        }
    }

	public long getTotalGetRewardTimes() {
		return totalGetRewardTimes;
	}

	public void setTotalGetRewardTimes(long totalGetRewardTimes) {
		if(this.totalGetRewardTimes != totalGetRewardTimes) {
			this.totalGetRewardTimes = totalGetRewardTimes;
			setUpdateOption();
		}
	}
}
